package com.publiccms.entities.cms;
// Generated 2018-11-7 16:20:56 by Hibernate Tools 4.3.5.Final

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import com.publiccms.common.database.CmsUpgrader;
import com.publiccms.common.generator.annotation.GeneratorColumn;

/**
 * CmsComment generated by hbm2java
 */
@Entity
@Table(name = "cms_comment")
@DynamicUpdate
public class CmsComment implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    @GeneratorColumn(title = "ID")
    private Long id;
    @GeneratorColumn(title = "站点", condition = true)
    private short siteId;
    @GeneratorColumn(title = "发布用户", condition = true)
    private long userId;
    @GeneratorColumn(title = "回复ID", condition = true)
    private Long replyId;
    @GeneratorColumn(title = "回复用户ID", condition = true)
    private Long replyUserId;
    @GeneratorColumn(title = "内容ID", condition = true)
    private long contentId;
    @GeneratorColumn(title = "审核用户", condition = true)
    private Long checkUserId;
    @GeneratorColumn(title = "审核日期", order = true)
    private Date checkDate;
    @GeneratorColumn(title = "更新日期", order = true)
    private Date updateDate;
    @GeneratorColumn(title = "创建日期", order = true)
    private Date createDate;
    @GeneratorColumn(title = "状态", condition = true)
    private int status;
    @GeneratorColumn(title = "已删除", condition = true)
    private boolean disabled;
    @GeneratorColumn(title = "内容")
    private String text;

    public CmsComment() {
    }

    public CmsComment(short siteId, long userId, long contentId, Date createDate, int status, boolean disabled) {
        this.siteId = siteId;
        this.userId = userId;
        this.contentId = contentId;
        this.createDate = createDate;
        this.status = status;
        this.disabled = disabled;
    }

    public CmsComment(short siteId, long userId, Long replyId, Long replyUserId, long contentId, Long checkUserId, Date checkDate, Date updateDate,
            Date createDate, int status, boolean disabled, String text) {
        this.siteId = siteId;
        this.userId = userId;
        this.replyId = replyId;
        this.replyUserId = replyUserId;
        this.contentId = contentId;
        this.checkUserId = checkUserId;
        this.checkDate = checkDate;
        this.updateDate = updateDate;
        this.createDate = createDate;
        this.status = status;
        this.disabled = disabled;
        this.text = text;
    }

    @Id
    @GeneratedValue(generator = "cmsGenerator")
    @GenericGenerator(name = "cmsGenerator", strategy = CmsUpgrader.IDENTIFIER_GENERATOR)
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "site_id", nullable = false)
    public short getSiteId() {
        return this.siteId;
    }

    public void setSiteId(short siteId) {
        this.siteId = siteId;
    }

    @Column(name = "user_id", nullable = false)
    public long getUserId() {
        return this.userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    @Column(name = "reply_id")
    public Long getReplyId() {
        return this.replyId;
    }

    public void setReplyId(Long replyId) {
        this.replyId = replyId;
    }

    @Column(name = "reply_user_id")
    public Long getReplyUserId() {
        return this.replyUserId;
    }

    public void setReplyUserId(Long replyUserId) {
        this.replyUserId = replyUserId;
    }

    @Column(name = "content_id", nullable = false)
    public long getContentId() {
        return this.contentId;
    }

    public void setContentId(long contentId) {
        this.contentId = contentId;
    }

    @Column(name = "check_user_id")
    public Long getCheckUserId() {
        return this.checkUserId;
    }

    public void setCheckUserId(Long checkUserId) {
        this.checkUserId = checkUserId;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "check_date", length = 19)
    public Date getCheckDate() {
        return this.checkDate;
    }

    public void setCheckDate(Date checkDate) {
        this.checkDate = checkDate;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "update_date", length = 19)
    public Date getUpdateDate() {
        return this.updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_date", nullable = false, length = 19)
    public Date getCreateDate() {
        return this.createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Column(name = "status", nullable = false)
    public int getStatus() {
        return this.status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Column(name = "disabled", nullable = false)
    public boolean isDisabled() {
        return this.disabled;
    }

    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }

    @Column(name = "text", length = 65535)
    public String getText() {
        return this.text;
    }

    public void setText(String text) {
        this.text = text;
    }

}
